<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" autocomplete="off">
    <input class="form-control" name="row[is_chat]" type="hidden" value="1">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('系列名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-series_id" data-source="series/index" class="form-control selectpage" name="row[series_id]" type="text" value="{$row.series_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('课程开始时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="r-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{$room.start_time|datetime}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('主讲老师')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="r-talk_id" data-source="chat/user/index" class="form-control selectpage" data-field="name"  name="row[talk_id]" type="text" value="{$room.talk_id|htmlentities}">
        </div>
    </div>

    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Origin_price')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-origin_price" data-rule="required" class="form-control" step="0.01" name="row[origin_price]" type="number" value="{$row.origin_price|htmlentities}">-->
        <!--</div>-->
    <!--</div>-->
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Price')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">-->
        <!--</div>-->
    <!--</div>-->
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Visitor_origin_price')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-visitor_origin_price" data-rule="required" class="form-control" step="0.01" name="row[visitor_origin_price]" type="number" value="{$row.visitor_origin_price|htmlentities}">-->
        <!--</div>-->
    <!--</div>-->
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Visitor_price')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-visitor_price" data-rule="required" class="form-control" step="0.01" name="row[visitor_price]" type="number" value="{$row.visitor_price|htmlentities}">-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image" data-multipart={"controller":"{$controller}"}><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false" data-multipart="{$controller}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <!--<div class="form-group">-->
        <!--<label for="c-images" class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<div class="input-group">-->
                <!--<input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}" />-->
                <!--<div class="input-group-addon no-border no-padding">-->
                    <!--<span><button type="button" id="plupload-imagethumb" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/webp" data-multiple="true" data-preview-id="p-images" data-multipart={"controller":"{$controller}"}><i class="fa fa-upload"></i>{:__('Upload')}</button></span>-->
                    <!--<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true" data-multipart="{$controller}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
                <!--</div>-->
                <!--<span class="msg-box n-right"></span>-->
            <!--</div>-->
            <!--<ul class="row list-inline plupload-preview" id="p-images"></ul>-->
        <!--</div>-->
    <!--</div>-->
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<textarea id="c-introduce" class="form-control " rows="5" name="row[introduce]" cols="50">{$row.introduce|htmlentities}</textarea>-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50" >{$row.content|htmlentities}</textarea>
        </div>
    </div>
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Author')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-author" data-rule="required" class="form-control" name="row[author]" type="text" value="{$row.author|htmlentities}">-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Room.is_show_ppt')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="isShowPptList" item="vo"}
                <label for="row[is_show_ppt]-{$key}" onclick="showppt(this)"><input id="row[is_show_ppt]-{$key}" name="row[is_show_ppt]" type="radio" value="{$key}" {in name="key" value="$room.is_show_ppt"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group" id="showppt" {if $room.is_show_ppt == 0} style="display: none;"{/if}>
        <label for="r-file" class="control-label col-xs-12 col-sm-2">{:__('上传ppt照片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="r-file" class="form-control" size="50" name="row[file]" type="text" value="{$room.file|htmlentities}" />
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-imagethumb" class="btn btn-danger plupload" data-input-id="r-file" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/webp" data-multiple="true" data-preview-id="p-images" data-multipart={"controller":"{$controller}"}><i class="fa fa-upload"></i>{:__('Upload')}</button></span>
                    <!--<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="r-file" data-mimetype="image/*" data-multiple="true" data-multipart="{$controller}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
                </div>
                <!--<span class="msg-box n-right"></span>-->
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Org_cate_id')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<input id="c-org_cate_id" data-source="org/cate/index" class="form-control selectpage" name="row[org_cate_id]" type="text" value="{$row.org_cate_id|htmlentities}">-->
        <!--</div>-->
    <!--</div>-->
    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Is_buy')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
                        <!---->
            <!--<select  id="c-is_buy" data-rule="required" class="form-control selectpicker" name="row[is_buy]">-->
                <!--{foreach name="isBuyList" item="vo"}-->
                    <!--<option value="{$key}" {in name="key" value="$row.is_buy"}selected{/in}>{$vo}</option>-->
                <!--{/foreach}-->
            <!--</select>-->

        <!--</div>-->
    <!--</div>-->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    function showppt(obj)
    {
        var checked = $(obj).children('input').val();
        if(checked == 0){
            $('#showppt').hide();
        }else{
            $('#showppt').show();
        }
    }
</script>
